<template>
  <div>
    {{ visible ? '弹窗显示了' : '弹窗隐藏了' }}
    <button @click="handleClose">x</button>
  </div>
  
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: true
    }
  },
  methods: {
    handleClose() {
      this.$emit('update:visible', false)
    }
  }
}
</script>

<style>

</style>